package com.inxedu.os.edu.dao;

import com.inxedu.os.edu.pojo.EduArticle;
import com.inxedu.os.edu.pojo.EduArticleContent;
import com.inxedu.os.edu.pojo.EduArticleExample;
import com.inxedu.os.edu.pojo.QueryArticle;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 后台文章Dao
 */
@Mapper
public interface EduArticleMapper {
    int countByExample(EduArticleExample example);

    int deleteByExample(EduArticleExample example);

    int deleteByPrimaryKey(Integer articleId);

    int insert(EduArticle record);

    int insertSelective(EduArticle record);

    List<EduArticle> selectByExample(EduArticleExample example);

    EduArticle selectByPrimaryKey(Integer articleId);

    int updateByExampleSelective(@Param("record") EduArticle record, @Param("example") EduArticleExample example);

    int updateByExample(@Param("record") EduArticle record, @Param("example") EduArticleExample example);

    int updateByPrimaryKeySelective(EduArticle record);

    int updateByPrimaryKey(EduArticle record);
    //模糊查看文章列表
    List<EduArticle> lookArticleList(@Param("queryArticle") QueryArticle queryArticle);

    //修改（更新）文章信息
    void updateArticle(EduArticle eduArticle);

    //修改（更新）文章内容
    void updateArticleContent(EduArticleContent eduArticleContent);

    //根据id查询文章信息
    EduArticle findArticleById(int articleId);

    //根据文章Id查找文章内容
    String findArticleContentByArticleId(int articleId);

    //删除文章信息
    void deleteArticleByIds(String articelIds);

    //删除文章内容
    void deleteArticleContentByArticleIds(String articelIds);

    //添加文章信息
    int addArticle(EduArticle article);

}